package biblioteca;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Utilidades 

{
	private static Statement stmt = UtilidadesBD.getStmt();
	private static ResultSet rs = UtilidadesBD.getRs();
	public static boolean usuarioExiste(String usu)
	{
		String query = "SELECT USUARIO FROM CLIENTE";
		try {
			rs = stmt.executeQuery(query);

		while(rs.next())
		{
			if(usu.equals(rs.getString(1)))
				return false;	
		}	
		
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}
		return true;
	}

}
